package com.baizhi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName t_user
 */
@TableName(value ="t_user")
@Data
public class User implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer pkUid;

    @NotBlank(message = "用户名不能为空")
    private String userName;

    private String password;

    /**
     * 盐值
     */
    private String salt;

    /**
     * 真实姓名
     */
    @NotBlank(message = "姓名不能为空")
    private String realName;

   @NotBlank(message = "电话不能为空")
    private String phone;

    @NotBlank(message = "性别不能为空")
    private String sex;

    @NotBlank(message="地址不能为空")
    private String address;

    /**
     * 角色
     */
    private int roleId;

    /**
     * 创建时间
     */
    private Date gmtCreate;

    /**
     * 最后修改时间
     */
    private Date gmtModified;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}
